


//declare var wx: any;

import { UserData } from "./minigame_bird/game";
import { State_Logo } from "./minigame_bird/state/state_logo";
import { tt_impl } from "./ttapi_impl_wegame/ttimpl_wx"
import { tt } from "./ttapi_interface/ttapi.js"

import * as tt2 from "./ttapi_layer2/ttlayer2.js";



export class App {

    //此处的CommonData是Test中的不太好

    async Start(): Promise<void> {

        //首先 初始化 TTEngine ，TTEngine 是一套极简的渲染引擎
        let impl = new tt_impl.ttimpl_wx();
        impl.Init();

        //初始化app框架
        let udata = new UserData();

        let debug = true;
        let app = new tt2.QFrame_App<UserData>(udata, "code/minigame_bird/media/hzk12.ttfont.bin", debug);
        tt2.QFrame_ResMgr.SetDefResPath("code/minigame_bird/media");
        await app.Start();
        app.ChangeState(new State_Logo())
    }


}
